package com.tangkun.environment.view;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;

public class CustomViewPager extends ViewPager {

	private boolean isScroll = true;

	public CustomViewPager(Context context) {
		super(context);
	}

	public CustomViewPager(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public void setIsScroll(boolean isScroll) {
		this.isScroll = isScroll;
	}

	@Override
	public void scrollTo(int x, int y) {
		if (isScroll) {
			super.scrollTo(x, y);
		}
	}
/*
 * 重写viewpager里面的canScroll()方法
 */
//	@Override
//	protected boolean canScroll(View v,boolean checkV,)
	
}